package com.jtjrenren.android.taxi.driver.manger.api;

import java.util.Map;

import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by Administrator on 2016/8/17.
 */

public interface ApiService {

    @GET("/BKingAPI.ashx")
    Observable<String> checkNewVersion(@QueryMap Map<String, String> commonParams, @Query("curVersion") String version,
                                       @Query("PhoneType") String PhoneType, @Query("ProductType") String ProductType);

    @GET("/BKingAPI.ashx")
    Observable<String> getQdCount(@QueryMap Map<String, String> commonParams, @Query("driverid") String driverID);

    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> login(@FieldMap Map<String, String> commonParams, @Field("phoneNo") String phoneNo,
                             @Field("pwd") String pwd, @Field("companyid") String companyID);

    @GET("/BKingAPI.ashx")
    Observable<String> getDriverCarType(@QueryMap Map<String, String> commonParams, @Query("driverId") String driverId);

    @GET("/BKingAPI.ashx")
    Observable<String> getDriverDetails(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID,
                                        @Query("companyid") String companyID);

    @GET("/BKingAPI.ashx")
    Observable<String> getDriverInfoDetails(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID,
                                            @Query("companyid") String companyID);

    @GET("/BKingAPI.ashx")
    Observable<String> getTodaySr(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID);

    @GET("/BKingAPI.ashx")
    Observable<String> getDriverStatus(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID);

    @GET("/BKingAPI.ashx")
    Observable<String> getOrderHistrory(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID, @Query("pageSize") int pageSize,
                                        @Query("curPage") int currentPage);

    @GET("/BKingAPI.ashx")
    Observable<String> sendAuthCode(@QueryMap Map<String, String> commonParams, @Query("PhoneNo") String phone, @Query("type") String type);

    @GET("/BKingAPI.ashx")
    Observable<String> isUniquePhone(@QueryMap Map<String, String> commonParams, @Query("PhoneNo") String phone, @Query("userType") String userType
            , @Query("companyID") String companyID);

    @GET("/BKingAPI.ashx")
    Observable<String> getCompanyList(@QueryMap Map<String, String> commonParams, @Query("keywords") String keyValue);

    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> driverRegister(@FieldMap Map<String, String> commonParams, @Field("phoneNo") String phone, @Field("pwd") String pwd,
                                      @Field("companyid") String companyID, @Field("userName") String userName,
                                      @Field("permitNumber") String permitNumber, @Field("carNumber") String carNum,
                                      @Field("identityCard") String identityCard,
                                      @Field("driverImgName") String driverImageName, @Field("permitNumberImgName") String permitNumberImgName);

    @GET("/BKingAPI.ashx")
    Observable<String> checkYzm(@QueryMap Map<String, String> commonParams, @Query("PhoneNo") String phoneNO, @Query("key") String keyCode,
                                @Query("type") String type);

    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> upImg(@FieldMap Map<String, String> commonParams, @Field("strbase64") String imgBase64Str);


    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> upPwd(@FieldMap Map<String, String> commonParams, @Field("opwd") String oldPwd,
                             @Field("npwd") String newPwd,
                             @Field("driverID") String driverID, @Field("companyid") String companyID);

    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> resetPwd(@FieldMap Map<String, String> commonParams, @Field("newpwd") String pwd,
                                @Field("PhoneNo") String phoneNo, @Field("companyid") String companyid);

    @GET("/BKingAPI.ashx")
    Observable<String> getPayBindingData(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID,
                                         @Query("companyID") String companyID, @Query("type") int type);

    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> SetBankBindingData_M(@FieldMap Map<String, String> commonParams, @Field("driverID") String driverID,
                                            @Field("accountName") String accountName, @Field("account") String account,
                                            @Field("bankCode") String bankcode, @Field("type") int type, @Field("province") String pro,
                                            @Field("city") String city);

    @GET("/BKingAPI.ashx")
    Observable<String> getDriverPocketInfo(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID);

    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> updateRechareMent_M(@FieldMap Map<String, String> commonParams, @Field("driverID") String driverID,
                                           @Field("tradeType") String tradeType, @Field("tradeAccount") String account,
                                           @Field("wallet") String value);

    @GET("/BKingAPI.ashx")
    Observable<String> getTxHistory(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID);

    @GET("/BKingAPI.ashx")
    Observable<String> getSrHistory(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID, @Query("pageSize") int pageSize,
                                    @Query("curPage") int currentPage);

    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> setDriverRarelyDuty(@FieldMap Map<String, String> commonParams, @Field("driverID") String driverID,
                                           @Field("dutyType") String dutyType, @Field("phoneNo") String phoneNo,
                                           @Field("address") String address, @Field("radius") String radius,
                                           @Field("changeTime") String changeTime, @Field("sliceTime") String sliceTime);

    @GET("/BKingAPI.ashx")
    Observable<String> getDutyInfo(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID);

    @FormUrlEncoded
    @POST("/BKingAPI.ashx")
    Observable<String> SetDriverDutyState(@FieldMap Map<String, String> commonParams, @Field("driverID") String driverID,
                                          @Field("dutyType") String dutyType, @Field("isOn") String isOn);

    @GET("/BKingAPI.ashx")
    Observable<String> getOrderDetails(@QueryMap Map<String, String> commonParams, @Query("orderID") String orderID);

    @GET("/BKingAPI.ashx")
    Observable<String> getYYDList(@QueryMap Map<String, String> commonParams, @Query("driverID") String driverID);

    @GET("/BKingAPI.ashx")
    Observable<String> getOrderNotFinish(@QueryMap Map<String, String> commonParams, @Query("CarNo") String carNo, @Query("DriverID") String driverID);

    @GET("/BKingAPI.ashx")
    Observable<String> getOrderJf(@QueryMap Map<String, String> commonParams, @Query("orderId") String orderID);
}
